load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "goroutineui",
    srcs = ["dump.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/server/debug/goroutineui",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/util/allstacks",
        "@com_github_maruel_panicparse_v2//stack",
    ],
)

go_test(
    name = "goroutineui_test",
    size = "small",
    srcs = ["dump_test.go"],
    data = ["@go_sdk//:files"],
    embed = [":goroutineui"],
    deps = [
        "//pkg/build/bazel",
        "//pkg/util/leaktest",
        "@com_github_maruel_panicparse_v2//stack",
        "@com_github_stretchr_testify//assert",
    ],
)
